package eppic.pkg;

import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.AdapterView;
import android.view.View;
import android.database.Cursor;

public class ClientSpinnerListener implements OnItemSelectedListener {

	public int client_id;
	
    public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) 
    {
    	Cursor c = (Cursor) parent.getItemAtPosition(pos);
    	String name = c.getString(c.getColumnIndex("_id"));
    	this.client_id = Integer.parseInt(name);
    }

    public void onNothingSelected(AdapterView parent) {
      // Do nothing.
    }
}